package com.goodomen.garbage.score.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class PhoneUtil {

    private PhoneUtil() { }

    private static Pattern mobileP = Pattern.compile("^1\\d{10}$");

    /**
     * 校验手机号码格式是否正确
     * @param mobile    手机号码
     * @return  是否格式正确
     */
    public static boolean checkMobileFormat(String mobile) {
        Matcher mobileM = mobileP.matcher(mobile);
        return mobileM.matches();
    }
}

